<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of Required
 *
 * @author chaporgin_a
 */
class VA_Form_Validator_Required extends VA_Form_Validator {

  public function isValid($value) {
    $this->errorMessages = array();
    if(empty ($value)) {
      $this->errorMessages[] = 'Это поле необходимо заполнить';
      return FALSE;
    }
    return TRUE;
  }
  public function getHTMLTagAttributes() {
    return array(
      'class' => array('required')
      );
  }
}

